<?php declare(strict_types=1);


namespace App\Model\Entity;

use Swoft\Db\Annotation\Mapping\Column;
use Swoft\Db\Annotation\Mapping\Entity;
use Swoft\Db\Annotation\Mapping\Id;
use Swoft\Db\Eloquent\Model;


/**
 *
 * Class User
 *
 * @since 2.0
 *
 * @Entity(table="user")
 */
class User extends Model
{
    /**
     *
     * @Id()
     * @Column(name="user_id", prop="userId")
     *
     * @var int
     */
    private $userId;

    /**
     *
     *
     * @Column(name="im_name", prop="imName")
     *
     * @var string
     */
    private $imName;

    /**
     *
     *
     * @Column()
     *
     * @var string|null
     */
    private $domain;

    /**
     *
     *
     * @Column(name="user_name", prop="userName")
     *
     * @var string|null
     */
    private $userName;

    /**
     *
     *
     * @Column()
     *
     * @var string|null
     */
    private $passwd;

    /**
     *
     *
     * @Column(name="nick_name", prop="nickName")
     *
     * @var string|null
     */
    private $nickName;

    /**
     *
     *
     * @Column()
     *
     * @var string|null
     */
    private $avatar;

    /**
     *
     *
     * @Column(name="self_sign", prop="selfSign")
     *
     * @var string|null
     */
    private $selfSign;

    /**
     *
     *
     * @Column(name="created_at", prop="createdAt")
     *
     * @var int
     */
    private $createdAt;

    /**
     *
     *
     * @Column(name="updated_at", prop="updatedAt")
     *
     * @var int|null
     */
    private $updatedAt;

    /**
     *
     *
     * @Column(name="allow_search", prop="allowSearch")
     *
     * @var int|null
     */
    private $allowSearch;

    /**
     *
     *
     * @Column()
     *
     * @var string|null
     */
    private $phone;

    /**
     *
     *
     * @Column(name="allow_modify_name", prop="allowModifyName")
     *
     * @var int|null
     */
    private $allowModifyName;

    protected const CREATED_AT = 'created_at';
    protected const UPDATED_AT = 'updated_at';

    /**
     * @param int $userId
     *
     * @return void
     */
    public function setUserId(int $userId): void
    {
        $this->userId = $userId;
    }

    /**
     * @param string $imName
     *
     * @return void
     */
    public function setImName(string $imName): void
    {
        $this->imName = $imName;
    }

    /**
     * @param string|null $domain
     *
     * @return void
     */
    public function setDomain(?string $domain): void
    {
        $this->domain = $domain;
    }

    /**
     * @param string|null $userName
     *
     * @return void
     */
    public function setUserName(?string $userName): void
    {
        $this->userName = $userName;
    }

    /**
     * @param string|null $passwd
     *
     * @return void
     */
    public function setPasswd(?string $passwd): void
    {
        $this->passwd = $passwd;
    }

    /**
     * @param string|null $nickName
     *
     * @return void
     */
    public function setNickName(?string $nickName): void
    {
        $this->nickName = $nickName;
    }

    /**
     * @param string|null $avatar
     *
     * @return void
     */
    public function setAvatar(?string $avatar): void
    {
        $this->avatar = $avatar;
    }

    /**
     * @param string|null $selfSign
     *
     * @return void
     */
    public function setSelfSign(?string $selfSign): void
    {
        $this->selfSign = $selfSign;
    }

    /**
     * @param int $createdAt
     *
     * @return void
     */
    public function setCreatedAt(int $createdAt): void
    {
        $this->createdAt = $createdAt;
    }

    /**
     * @param int|null $updatedAt
     *
     * @return void
     */
    public function setUpdatedAt(?int $updatedAt): void
    {
        $this->updatedAt = $updatedAt;
    }

    /**
     * @param int|null $allowSearch
     *
     * @return void
     */
    public function setAllowSearch(?int $allowSearch): void
    {
        $this->allowSearch = $allowSearch;
    }

    /**
     * @param string|null $phone
     *
     * @return void
     */
    public function setPhone(?string $phone): void
    {
        $this->phone = $phone;
    }

    /**
     * @param int|null $allowModifyName
     *
     * @return void
     */
    public function setAllowModifyName(?int $allowModifyName): void
    {
        $this->allowModifyName = $allowModifyName;
    }

    /**
     * @return int
     */
    public function getUserId(): ?int
    {
        return $this->userId;
    }

    /**
     * @return string
     */
    public function getImName(): ?string
    {
        return $this->imName;
    }

    /**
     * @return string|null
     */
    public function getDomain(): ?string
    {
        return $this->domain;
    }

    /**
     * @return string|null
     */
    public function getUserName(): ?string
    {
        return $this->userName;
    }

    /**
     * @return string|null
     */
    public function getPasswd(): ?string
    {
        return $this->passwd;
    }

    /**
     * @return string|null
     */
    public function getNickName(): ?string
    {
        return $this->nickName;
    }

    /**
     * @return string|null
     */
    public function getAvatar(): ?string
    {
        return $this->avatar;
    }

    /**
     * @return string|null
     */
    public function getSelfSign(): ?string
    {
        return $this->selfSign;
    }

    /**
     * @return int
     */
    public function getCreatedAt(): ?int
    {
        return $this->createdAt;
    }

    /**
     * @return int|null
     */
    public function getUpdatedAt(): ?int
    {
        return $this->updatedAt;
    }

    /**
     * @return int|null
     */
    public function getAllowSearch(): ?int
    {
        return $this->allowSearch;
    }

    /**
     * @return string|null
     */
    public function getPhone(): ?string
    {
        return $this->phone;
    }

    /**
     * @return int|null
     */
    public function getAllowModifyName(): ?int
    {
        return $this->allowModifyName;
    }

}
